<div class="ui padded grid">
<div class="row" ng-show="vm.error">
    <div class="column">
        <div class="ui error message">
            <div class="header">错误信息...</div>
            <p>{{vm.error}}</p>
        </div>
    </div>
</div>
<div class="row">
    <div class="column">
        <div class="ui segment">
            <div class="ui form" ng-submit="vm.addRegistry()" ng-method="post">
                <h4 class="ui dividing header">仓库详细信息</h4>
                <label>仓库名称</label>
                <div class="field">
                    <input type="text" name="name" ng-model="vm.name" placeholder="Name of registry (i.e. local)">
                </div>
                <label>仓库地址</label>
                <div class="field">
                    <input type="text" name="addr" ng-model="vm.addr" placeholder="仓库地址（Registry Addr (比如:dockerclub.net:5000）">
                </div>
                <div class="ui hidden divider"></div>
                <div class="ui green submit button">新增仓库</div>
            </div>
        </div>
    </div>
</div>
</div>
<script>
$(function(){
    $('.ui.form')
        .form({
            name: {
                identifier : 'name',
                rules: [
                {
                    type   : 'empty',
                    prompt : 'Please enter a name'
                }
                ]
            },
            addr: {
                identifier : 'addr',
                rules: [
                {
                    type   : 'empty',
                    prompt : 'Please enter an address'
                }
                ]
            }
        });

    $('.ui.checkbox').checkbox();
});
</script>
